<template>
  <div>
    <my-slot>
      <slot-item font-color="red" item-key="1"><p>slot1</p></slot-item>
      <slot-item item-key="2"><p>slot2</p></slot-item>
    </my-slot>
  </div>
</template>
<style lang="less" scoped></style>
<script>
import mySlot from "./mySlot";
import slotItem from "./slotItem";
export default {
  name: "testSlot",
  components: {
    mySlot,
    slotItem,
  },
  watch: {
    "$store.state.mySlot.count": {
      handler(nval) {
        for (let val of nval) {
          console.log(`no: ${val.no}   val:${val.val}`);
        }
      },
      deep: true,
    },
  },
  data() {
    return {};
  },
};
</script>
